<?php


namespace app\api\validate;

class AddressValidate extends BaseValidate
{
    protected $rule = [
        'loc_name' => 'require',
        'address' => 'require',
        'consignee' => 'require',
        'mobile' => 'require|mobile',
        'lng' => 'require|isFloatOrPositiveInteger',
        'lat' => 'require|isFloatOrPositiveInteger',
        'distance' => 'require|isFloatOrPositiveInteger',
        'is_default' => 'in:0,1',
    ];

    protected $message = [
        'loc_name.require' => '请选择地址',
        'address.require' => '请输入详细地址',
        'consignee.require' => '请输入收货人',
        'lng.require' => '请输入联系电话',
        'lng.isFloatOrPositiveInteger' => '请输入联系电话',
        'lat.require' => '请输入联系电话',
        'lat.isFloatOrPositiveInteger' => '请输入联系电话',
    ];
}